﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using static System.Windows.Forms.VisualStyles.VisualStyleElement.TextBox;

namespace LibraryManagement
{
    public partial class OperationLogsForm : Form
    {
        private Form parentForm;

        public OperationLogsForm(Form parent)
        {
            InitializeComponent();
            parentForm = parent;
            LoadLogs();
        }

        private void LoadLogs()
        {
            string query = "SELECT * FROM Logs";
            DataTable dt = DatabaseHelper.ExecuteQuery(query);
            dgvLogs.DataSource = dt;
        }


        private void btnBack_Click_1(object sender, EventArgs e)
        {
            parentForm.Show();
            this.Close();
        }

        private void dgvLogs_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {

        }
    }
}
